<?php
 ini_set("session.gc_maxlifetime","600"); 
 session_start(); 

	if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 600)) {
		// last request was more than 30 minutes ago
		session_unset();     // unset $_SESSION variable for the run-time 
		session_destroy();   // destroy session data in storage
	}
	$_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp

	/*
	You can also use an additional time stamp to regenerate the session ID periodically to avoid attacks on sessions like session fixation:
	*/
	if (!isset($_SESSION['CREATED'])) {
		$_SESSION['CREATED'] = time();
	} else if (time() - $_SESSION['CREATED'] > 600) {
		// session started more than 30 minutes ago
		session_regenerate_id(true);    // change session ID for the current session an invalidate old session ID
		$_SESSION['CREATED'] = time();  // update creation time
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>RasPi</title>
<link href="css/estilos_under_construction.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery/jquery.min.js"></script> 
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/fonts/Abraham_Lincoln_400.font.js"></script>
<script type="text/javascript" src="js/fonts/Inspiration_400.font.js"></script>
<script type="text/javascript" src="js/fonts/Museo_Slab_100_400-Museo_Slab_700_400.font.js"></script>
<script type="text/javascript">
	Cufon.replace('.logo h1', {fontFamily: 'Inspiration'});
	Cufon.replace('.logo h2', {fontFamily: 'Museo Slab 100'});
	Cufon.replace('.logo h2 span', {fontFamily: 'Abraham Lincoln'});
	Cufon.replace('p.big_text, p.small_text', {fontFamily: 'Museo Slab 100'});
	Cufon.replace('p.big_text strong, p.small_text strong', {fontFamily: 'Museo Slab 700'});
</script>


</head>
<body>
<div id="transy">
</div>
<div id="wrapper">
	<div class="logo"><h1>RasPi</h1><h2><strong class="one"></strong>design <span>&amp;</span> development<strong class="two"></strong></h2></div>
	<div class="content">
		<p class="big_text"><strong>we are working on something</strong> very interesting!</p>
		<p class="small_text"><strong>be notified.</strong> we just need your email address.</p>
		<div class="form">
			<div class="field_content">
			   <form action="classes/mailer/mailer.php" method="post">
				<input class="field" type="text" name="email"  />
				<input class="submit" type="submit" value="" />
			   </form>
			</div>
		</div>
		<div class="clear"></div>
		<?php 
		  // start up your PHP session!
		  if (isset($_SESSION['STATUS_TRIED']) == 1) {
			  if (isset($_SESSION['STATUS'])) {
				if ($_SESSION['STATUS'] == 'OK') {
				  ?>
				   <br /> <p class="big_text">You have a new email, please review your <font color="red"><strong> SPAM </strong></font> folder!</p>
				  <?php
				} else {
				  ?>
				   <br /> <p class="big_text">Upps, <strong> there was a <font color="red">big</font> error </strong> !!! (<?php echo $_SESSION['STATUS_ERROR']; ?>)</p>
				  <?php
				}
			  } 
		  }
		?>
		<!--ul class="social">
			<li class="pinterest"><a href="#"></a></li>
			<li class="instagram"><a href="#"></a></li>
			<li class="twitter"><a href="#"></a></li>
			<li class="facebook"><a href="#"></a></li>
		</ul-->
	</div>
</div>
</body>
</html>


